<?php

namespace app\common\product\validate;


use think\Validate;

class ProduceValidate extends Validate
{
    protected $rule = [
        'id' => ['require'],
        // 'company_id' => ['require'],
        'category_id' => ['require'],
        'title' => ['require'],
    ];

    protected $message = [
        "id.require" => "参数错误",
        "company_id.require" => "请选择所属公司",
        "category_id.require" => "请选择分类",
        "title.require" => "商品名称必填",
    ];

    protected $scene = [
        'create' => ['category_id', 'title'],
        'edit' => ['id', 'category_id', 'title'],
        'read' => ['id'],
        'delete' => ['id'],
    ];
}